<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<meta name="decorator" content="moduleView"/>
	<script type="text/javascript">
	function sendStatusSap(){
		var status ;
		var isTakeFlight = $("#isTakeFlight").val();
		if(isTakeFlight =="0"){
			status = "40";
		}else if(isTakeFlight =="1"){
			status ="80";
		}
		alert(status);
		Oosp_Loading('正在提交sap，请稍等...');
		$.getJSON(Com_Parameter.ContextPath + "/biz/contract/commonContract/${intMarketterminate.marketAssociated.id}/sendToSap?s_bean=commonContractStatusService&contractId=${intMarketterminate.marketAssociated.contractNo}&status="+status+"&store=${intMarketterminate.marketAssociated.storeId}&endDate=${intAssterminate.terminateDate}", function(data) {
			top.$.jBox.tip(data,'warning');
		});
	}
	</script>
</head>
<body>

	<div class="Report_f">
		<div class="Report_f_1">
			<div class="Report_f_title_1">
				促销撤柜意向信息
			</div>
				 <ul class="nav nav-tabs Report_f_title_2" id="myTab">
				  <li class="active"><a href="#home" data-toggle="tab">基本信息</a></li>
				   <li><a href="#workflow" data-toggle="tab">流程审批 </a></li> 
			  	  <li><a href="#diagram" data-toggle="tab">流程图</a></li>
			 </ul> 
			<input type="hidden" id='intent_type' value=intAssterminate>
			<input type="hidden" id='isTakeFlight' value="${intMarketterminate.isTakeFlight}">
			<div class="tab-content Report_f_title_3">
			  <div class="tab-pane active" id="home">
				  	<div class="Report_f_title_4">
				  	  	<div class="f_2">
								<div class="form-group col-sm-5">
								<label for="inputtext3" class="col-sm-5	 f_4">意向单号:</label>
								<div class="col-sm-5 f_7">
									${intMarketterminate.intentNo}
								</div>
							</div>
							<div class="form-group col-sm-5">
								<label for="inputtext3" class="col-sm-5 f_4">原合同号:</label>
									<div class="col-sm-5 f_7">
									<a href="${contextPath}/biz/contract/marketassociated/${intMarketterminate.marketAssociated.id}/view?navId=${navId}" target="_blank">	${intMarketterminate.marketAssociated.contractNo} </a>
									</div>
							</div>
						</div>
					<div class="f_3">
							<div class="form-group col-sm-5">
									<label for="inputtext3" class="col-sm-5 f_4">原合同名称:</label>
									<div class="col-sm-5 f_7">
										${intMarketterminate.marketAssociated.subject}
									</div>
							</div>
							<div class="form-group col-sm-5">
									<label for="inputtext3" class="col-sm-5	 f_4">意向单状态:</label>
									<div class="col-sm-5 f_7">
										<ossp:value dictType="INTENT_STATUS" key="${intMarketterminate.status}"></ossp:value>
									</div>
							</div>
					</div>
						
					<div class="f_2">
						<div class="form-group col-sm-5">
							<label for="inputtext3" class="col-sm-5	 f_4">是否逃场:</label>
							<div class="col-sm-5 f_7">
							<input type="hidden" id="isTakeFlight"  value="${intMarketterminate.isTakeFlight}">
								<ossp:value dictType="IS_TAKE_FLIGHT" key="${intMarketterminate.isTakeFlight}"></ossp:value>
							</div>
						</div>
						<div class="form-group col-sm-5">
							<label for="inputtext3" class="col-sm-5 f_4">管理区域:</label>
							<div class="col-sm-5 f_7">
								${intMarketterminate.area}
							</div>
						</div>
					</div>
					<div class="f_3">
						<div class="form-group col-sm-5">
							<label for="inputtext3" class="col-sm-5 f_4">签约楼层:</label>
							<div class="col-sm-5 f_7">
								${intMarketterminate.floor}
							</div>
						</div>
						<div class="form-group col-sm-5">
							<label for="inputtext3" class="col-sm-5	 f_4">签约门店:</label>
							<div class="col-sm-5 f_7">
								${intMarketterminate.store}
							</div>
						</div>
					</div>
					<div class="f_3">
						<div class="form-group col-sm-5">
							<label for="inputtext3" class="col-sm-5 f_4">供应商名称:</label>
							<div class="col-sm-5 f_7">
								${intMarketterminate.supplierName}
							</div>
						</div>
						<div class="form-group col-sm-5">
							<label for="shop_lab" class="col-sm-5 f_4">供应商编号:</label>
							<div class="col-sm-5 f_7">
								${intMarketterminate.supplierNo}
							</div>
						</div>
					</div>
					
					<div class="f_2">
						<div class="form-group col-sm-5">
							<label for="inputtext3" class="col-sm-5 f_4">是否欠款:</label>
							<div class="col-sm-5 f_7">
								<ossp:value dictType="YESORNO" key="${intMarketterminate.isDebt}"></ossp:value> 
							</div>
						</div>
						<div class="form-group col-sm-5">
							<label for="shop_lab" class="col-sm-5 f_4">有无法律纠纷:</label>
							<div class="col-sm-5 f_7">
								<ossp:value dictType="YESORNO" key="${intMarketterminate.hasLawRisk}"></ossp:value>
							</div>
						</div>
					</div>
					
					<div class="f_3">
						<div class="form-group col-sm-5">
							<label for="inputtext3" class="col-sm-5 f_4">合同开始日期:</label>
							<div class="col-sm-5 f_7">
								 <fmt:formatDate value="${intMarketterminate.startDate}" type="both" pattern="yyyy-MM-dd"/>
							</div>
						</div>
						<div class="form-group col-sm-5">
							<label for="inputtext3" class="col-sm-5 f_4">合同结束日期:</label>
							<div class="col-sm-5 f_7">
								<fmt:formatDate value="${intMarketterminate.endDate}" type="both" pattern="yyyy-MM-dd"/>
							</div>
						</div>
					</div>
					
					<div class="f_2">
						<div class="form-group col-sm-5">
							<label for="inputtext3" class="col-sm-5 f_4">是否超合同经营期限:</label>
							<div class="col-sm-5 f_7">
								 <ossp:value dictType="YESORNO" key="${intMarketterminate.isExpiredRun}"></ossp:value>
							</div>
						</div>
						<div class="form-group col-sm-5">
							<label for="inputtext3" class="col-sm-5 f_4">预计撤柜日期:</label>
							<div class="col-sm-5 f_7">
								<fmt:formatDate value="${intMarketterminate.terminateDate}" type="both" pattern="yyyy-MM-dd"/>
							</div>
						</div>
					</div>
					
					<div class="f_3">
						<div class="form-group col-sm-5">
							<label for="inputtext3" class="col-sm-5 f_4">供应商撤柜原因:</label>
							<div class="col-sm-5 f_7">
								<textarea rows="5" cols="90" class="form" readonly="readonly">${intMarketterminate.terminateReason}</textarea>
							</div>
						</div>
					</div>
					
					<div class="f_2">
						<div class="form-group col-sm-5">
							<label for="inputtext3" class="col-sm-5 f_4">顶场供应商:</label>
							<div class="col-sm-5 f_7">
								 ${intMarketterminate.replaceSupplier}
							</div>
						</div>
						<div class="form-group col-sm-5">
							<label for="inputtext3" class="col-sm-5 f_4">顶场品牌:</label>
							<div class="col-sm-5 f_7">
								${intMarketterminate.replaceBrand}
							</div>
						</div>
					</div>
					
					<div class="f_3">
						<div class="form-group col-sm-5">
							<label for="inputtext3" class="col-sm-5 f_4">品牌简介:</label>
							<div class="col-sm-5 f_7">
								<textarea rows="5" cols="90" class="form" readonly="readonly">${intMarketterminate.brandSummary}</textarea>
							</div>
						</div>
					</div>
					
					<div class="f_2">
						<div class="form-group col-sm-5">
							<label for="inputtext3" class="col-sm-5 f_4">顶场品牌招商负责人:</label>
							<div class="col-sm-5 f_7">
								 ${intMarketterminate.replaceInviteHead}
							</div>
						</div>
						<div class="form-group col-sm-5">
							<label for="inputtext3" class="col-sm-5 f_4">顶场品牌1:</label>
							<div class="col-sm-5 f_7">
								${intMarketterminate.replaceBrand1}
							</div>
						</div>
					</div>
					<div class="f_3">
						<div class="form-group col-sm-5">
							<label for="inputtext3" class="col-sm-5 f_4">顶场品牌2:</label>
							<div class="col-sm-5 f_7">
								 ${intMarketterminate.replaceBrand2}
							</div>
						</div>
						<div class="form-group col-sm-5">
							<label for="inputtext3" class="col-sm-5 f_4">顶场品牌3:</label>
							<div class="col-sm-5 f_7">
								${intMarketterminate.replaceBrand3}
							</div>
						</div>
					</div>
					
					<div class="f_2">
						<div class="form-group col-sm-5">
							<label for="inputtext3" class="col-sm-5 f_4">预计进场日期:</label>
							<div class="col-sm-5 f_7">
								 
								 <fmt:formatDate value="${intMarketterminate.expectEnterDate}" type="both" pattern="yyyy-MM-dd"/>
							</div>
						</div>
						<div class="form-group col-sm-5">
							<label for="inputtext3" class="col-sm-5 f_4">意向审批情况:</label>
							<div class="col-sm-5 f_7">
								${intMarketterminate.intentSituation}
							</div>
						</div>
					</div>
					<div class="f_3">
						<div class="form-group col-sm-5">
							<label for="createTime_lab" class="col-sm-5 f_4">提报人:</label>
							<div class="col-sm-5 f_7">
								${intMarketterminate.createBy}
	                		</div>
						</div>
						<div class="form-group col-sm-5">
							<label for="createTime_lab" class="col-sm-5 f_4">提报时间:</label>
							<div class="col-sm-5 f_7">
								<fmt:formatDate value="${intMarketterminate.createTime}" type="both" pattern="yyyy-MM-dd HH:mm:ss"/>
	                		</div>
						</div>
				  </div>
				  <div class="f_2">
						<div class="form-group col-sm-5">
							<label for="createTime_lab" class="col-sm-5 f_4">最后修改人:</label>
							<div class="col-sm-5 f_7">
								${intMarketterminate.updateBy}
	                		</div>
						</div>
						<div class="form-group col-sm-5">
							<label for="createTime_lab" class="col-sm-5 f_4">最后修改时间:</label>
							<div class="col-sm-5 f_7">
								<fmt:formatDate value="${intMarketterminate.updateTime}" type="both" pattern="yyyy-MM-dd HH:mm:ss"/>
	                		</div>
						</div>
					</div>
				</div>
				<div class="o-l-action">
					<shiro:hasPermission name="com.maoye.ossp.biz.contract.intent.Common:sendToSap">
						<a class="btn btn-info btn_3 btn_right" role="button" onclick="sendStatusSap()" href="#">更新SAP合同状态</a>
					</shiro:hasPermission>
					<c:if test="${intMarketterminate.status =='00' || intMarketterminate.status =='01'}">
						<shiro:hasPermission name="com.maoye.ossp.biz.contract.intent.IntMarketterminate:updateMarketterminate">
						 	<a class="btn btn-info btn_3 btn_right" role="button" href="${contextPath}/biz/intent/intMarketterminate/${intMarketterminate.id}/edit?navId=${navId}">修改</a>
						</shiro:hasPermission>
					</c:if>
					<a class="btn btn-info btn_3 btn_right" role="button" href="${contextPath}/biz/intent/intMarketterminate/list?navId=${navId}&pageNo=${pageNo}">返回</a>
				</div>
			</div>
			
			<div class="tab-pane" id="workflow"> 
									  <c:import url="/WEB-INF/views/bpm/workflow/workFlowInfo_view.jsp">
										<c:param name="formName" value="com.maoye.ossp.biz.intent.entity.IntMarketterminate" />
										<c:param name="flowKey" value="IntMarketterminate" />
										<c:param name="businessId" value="${intMarketterminate.id}"/>
										<c:param name="method" value="${method}"/>
										<c:param name="isStart" value="${isStart}"/>
									  </c:import> 			
								</div>
								<div class="tab-pane" id="diagram" style="overflow-x:auto;">
									<iframe id="diagram_iframe" scrolling="no" frameborder=0 width="100%">
									</iframe>
								</div>
							 <div class="tab-pane" id="contract_hist">
							 	<iframe id="versionFrame"   name="versionFrame"  
																scrolling="no" frameborder="no" width="100%"></iframe>
							 </div>	
		</div>
	</div>
</body>
</html>